﻿@using DCMS.ViewModel.Models.Configuration;
@using DCMS.Web.Framework.UI;
@using DCMS.Web.Framework;



@model StockEarlyWarningModel

<input asp-for="Id" type="hidden" />
<input asp-for="ProductId" type="hidden" />


@if (!ViewData.ModelState.IsValid)
{
    <div class="alert alert-warning alert-dismissable mt10 mb10">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <div asp-validation-summary="All"></div>
    </div>
}

<div class="form-group">
    <label asp-for="WareHouseId" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <dcms-select asp-for="WareHouseId" asp-items="@Model.WareHouses" asp-default="仓库" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.WareHouseId)
    </div>
</div>

<div class="form-group">
    <label asp-for="ProductId" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <div class="input-group">
            <input asp-for="ProductName" class="form-control" placeholder="商品..." />
            <span class="input-group-btn">
                <button id="btn_search_product" type="button" class="btn btn-default">
                    <span class="glyphicon glyphicon-search"></span>
                </button>
            </span>
        </div>
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.ProductName)
    </div>
</div>

<div class="form-group">
    <label asp-for="UnitId" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <dcms-select asp-for="UnitId" asp-items="@Model.UnitLists" class="form-control" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.UnitId)
    </div>
</div>


<div class="form-group">
    <label asp-for="BarCode" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <input asp-for="BarCode" class="form-control" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.BarCode)
    </div>
</div>


<div class="form-group">
    <label asp-for="AuxiliaryUnit" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <input asp-for="AuxiliaryUnit" class="form-control" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.AuxiliaryUnit)
    </div>
</div>

<div class="form-group">
    <label asp-for="ShortageWarningQuantity" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <input asp-for="ShortageWarningQuantity" class="form-control" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.ShortageWarningQuantity)
    </div>
</div>

<div class="form-group">
    <label asp-for="BacklogWarningQuantity" asp-postfix=":" class="col-lg-3 control-label" />
    <div class="col-lg-4">
        <input asp-for="BacklogWarningQuantity" class="form-control" />
    </div>
    <div class="col-lg-4">
        @Html.DCMSValidationMessageFor(model => model.BacklogWarningQuantity)
    </div>
</div>

